<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../common/header.jsp"%>
<%@page import="java.util.List"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<script src="js/jquery-3.5.1.js" type="text/javascript"></script>
<style>
    .bbtt {
        margin-left: 87px;
        margin-top: 10px;
    }
</style>
<script>
    function confirmAct(){
        if(confirm('确定要执行删除操作吗?')){
            return true;
        }
        return false;
    }
</script>
<!-- 市场班级管理页面开始 -->
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <h2>
                市场班级管理<i class="fa fa-user"></i> ${loginName }
            </h2>
            <!--  -->
            <div class="x_content">
                <br />
                <form id="query" data-parsley-validate
                      class="form-horizontal form-label-left" method="post"
                      action="${ctx}/MarketClassServlet.do">
                    <input type="hidden" name="param" value="cha"/>
                    <input type="hidden" name="pageIndex" value="1"/>
                    <ul style="list-style: none;">
                        <li><label class="control-label col-md-3 col-sm-3 col-xs-12"
                                   for=>市场类型 </label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <select name="classType" value="" id="classType"
                                        class="form-control col-md-7 col-xs-12">
                                    <option value="">---请选择---</option>
                                    <c:forEach var="marketClass" items="${classTypeList}">
                                        <option value="${marketClass.classType}${param.classType eq marketClass.classType?'selected':''}"
                                            >${marketClass.classType}
                                       </option>

                                    </c:forEach>
                                </select>
                            </div>
                        </li>
<%--                        <li>--%>
<%--                            <div class="form-group">--%>
<%--                                <label class="control-label col-md-3 col-sm-3 col-xs-12"--%>
<%--                                       for="first-name">班级 </label>--%>
<%--                                <div class="col-md-6 col-sm-6 col-xs-12">--%>
<%--                                    <select name="classname" id="classname" value=""--%>
<%--                                            class="form-control col-md-7 col-xs-12">--%>
<%--                                        <option value="">---请选择---</option>--%>
<%--                                        <c:forEach var="clist" items="${cList }">--%>
<%--                                            <option value="${clist.classname}"--%>
<%--                                                ${classname==clist.classname?'selected':''}>${clist.classname}</option>--%>
<%--                                        </c:forEach>--%>
<%--                                    </select>--%>
<%--                                </div>--%>
<%--                            </div>--%>
<%--                        </li>--%>
<%--                        <li>--%>
<%--                            <div class="form-group">--%>
<%--                                <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名--%>
<%--                                </label>--%>
<%--                                <div class="col-md-6 col-sm-6 col-xs-12">--%>
<%--                                    <input type="text" name="namec" value="${Name==null?'':Name}"--%>
<%--                                           class="form-control col-md-7 col-xs-12">--%>
<%--                                </div>--%>
<%--                            </div>--%>
<%--                        </li>--%>
                        <br />
                        <li>
                            <div class="form-group">
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <button type="submit" class="btn btn-primary bbtt"
                                            class="btn btn-success ">查&nbsp;&nbsp;&nbsp;&nbsp;询</button>
                                </div>
                            </div>
                        </li>
                    </ul>
                </form>
                <!-- <form id="demo-form2" data-parsley-validate
                    class="form-horizontal form-label-left" method="post"
                    action="idServlet">
                    <input type="hidden" name="pageIndex" value="1" />
                    <ul style="list-style: none; display: inline_block;">
                        <li>
                            <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                    for="first-name">学号查询 </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" name="stuidc" id="querySoftWareName"
                                        class="form-control col-md-7 col-xs-12">
                                </div>
                                <button type="submit" class="btn btn-primary"
                                    class="btn btn-success">查&nbsp;&nbsp;&nbsp;&nbsp;询</button>
                            </div>
                        </li>
                    </ul>
                </form>  -->
                <!--  		<li>
                            <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                    for="first-name">软件名称 </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" name="querySoftWareName"
                                        id="querySoftWareName" class="form-control col-md-7 col-xs-12">
                                </div>
                            </div>
                        </li>
                        -->
                <!--  	<li>
							<div class="form-group">
								<label class="control-label col-md-3 col-sm-3 col-xs-12"
									for="last-name">APP状态 </label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<select name="queryStatus"
										class="form-control col-md-7 col-xs-12">
<%--										<c:if test="${classInfoList!=null}">--%>
<%--											<option value="">---请选择---</option>--%>
<%--											<c:forEach var="classInfo" items="${classInfoList}">--%>
<%--												<option--%>
<%--													<c:if test="${dataDictionary.valueId==queryStatus}">selected="selected"</c:if>--%>
<%--													value="${dataDictionary.valueId}">${dataDictionary.valueName}</option>--%>
<%--											</c:forEach>--%>
<%--										</c:if>--%>
									</select>
								</div>
							</div></li>

						<li>
							<div class="form-group">
								<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<button type="submit" class="btn btn-primary"
										class="btn btn-success">查&nbsp;&nbsp;&nbsp;&nbsp;询</button>
								</div>
							</div></li>
					</ul>
				</form>
				-->
            </div>
            <!--   -->
        </div>
    </div>
    <!-- 表格 -->
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <a href="jsp/marketClassadd.jsp" class="btn btn-success btn-sm">添加班级信息</a>

            <c:if test="${! empty marketClassList}">
                <table id="datatable" class="table table-striped table-bordered">
                    <tr>
                        <th>班级编号</th>
                        <th>班级名称</th>
                        <th>类型</th>
                        <th style="width: 125px;">操作</th>
                    </tr>
                    <c:forEach var="marketClass" items="${ marketClassList }">
                        <tr>
                            <td>${ marketClass.mkClassId }</td>
                            <td>${ marketClass.className }</td>
                            <td>${ marketClass.classType }</td>

                            <td>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-danger">点击操作</button>
                                    <button type="button" class="btn btn-danger dropdown-toggle"
                                            data-toggle="dropdown" aria-expanded="false">
                                        <span class="caret"></span> <span class="sr-only">Toggle
											Dropdown</span>
                                    </button>
                                    <ul class="dropdown-menu" role="menu" >
                                        <li><a
                                                href="MarketClassServlet.do?param=modify_cha&&mkClassId=${marketClass.mkClassId}"
                                                data-toggle="tooltip" data-placement="top"
                                                data-original-title="修改班级信息">修改</a></li>
                                        <li><a   href="MarketClassServlet.do?param=delete&&mkClassId=${marketClass.mkClassId} "
                                               data-toggle="tooltip" data-placement="top"

                                               data-original-title="删除班级信息"  onclick="return deleteAct('${marketClass.mkClassId}');" >删除</a>
                                        </li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                    </c:forEach>
                    <tr>
                        <td colspan="10" style="text-align: right;"><span>共有${pages.totalCount}条数据,
				   	  ${pages.currentPageNo}/${pages.totalPageCount}页</span>
                            <a
                                    href="javascript:page_nav(document.forms[0],1);">首页</a>&nbsp;
                            <a
                                    href="javascript:page_nav(document.forms[0],${pages.currentPageNo-1});">上一页</a>&nbsp;
                            <a
                                    href="javascript:page_nav(document.forms[0],${pages.currentPageNo+1 });">下一页</a>&nbsp;
                            <a
                                    href="javascript:page_nav(document.forms[0],${pages.totalPageCount });">末页</a>
                        </td>
                    </tr>
                </table>
            </c:if>
        </div>
    </div>


    <c:if test="${ empty marketClassList }">
        <h1>没有学生信息</h1>
    </c:if>

    <!-- 分页 -->
</div>

<!-- appInfoList页面结束 -->
<!-- /page content -->
<%@ include file="../common/footer.jsp"%>
<script src="${ctx}/statics/localjs/marketshanchu.js"></script>
<script src="${ctx}/statics/localjs/rollpage.js"></script>

